package com.ylz.sjzx.manager;

import com.ylz.sjzx.sio.common.core.enums.SioBalanceType;
import com.ylz.sjzx.sio.core.SioRpcService;
import com.ylz.sjzx.sio.core.group.model.CmdMessage;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Description:
 *
 * @date:2021/9/15
 * @author:wiqi
 */
@RestController
@RequestMapping({"a"})
public class AController {

    @RequestMapping(value = {""}, method = {RequestMethod.GET})
    public Object blacklist() {
        CmdMessage cmdMessage = CmdMessage.builder().cmd("GroupMessageAdapter")
                .toGroupName("IM_group").toGroupRole("worker").message("hello").
                sioBalance(SioBalanceType.RANDOM).build();

        SioRpcService.sendCmdMessage(cmdMessage);
        return null;
    }
}
